#include <stdio.h>
int main()
{
	int ans=0;
	for(char c;(c=getchar())!=EOF;ans+=c=='\n');
	printf("%d\n",ans);
	return 0;
}
